<%-- 
    Document   : newpolladmin
    Created on : Aug 18, 2011, 9:46:12 PM
    Author     : s4201567 Tony Yu
--%>

<style type="text/css">
    #err { 
        position:relative;
        left:20px;
    }
    
    #pa-list {
        padding-left: 80px;
    }
    
    #syshome-title {
        text-align:center;
    }
    
   .sysadmintable {
    font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
    width:80%;
    border:1px solid #009933;
    text-align:center;
    }
    .sysadmintable td, .sysadmintable th .sysadmintable tr {
    font-size:1em;    
    border:1px solid #009933;
    padding:3px 7px 2px 17px;
    }
    .sysadmintable th {
    font-size:1.1em;
    text-align:center;
    padding-top:5px;
    padding-bottom:4px;
    background-color:#008833;
    color:#ffffff;
    }
    
    #back {
        padding-top:20px;
        padding-bottom:20px;
    }
</style>

<script language="JavaScript">
    function reactivate(id) {
        window.location="reactivatePA.html?pid="+id;     //window.location="reactivatePA.html?&id="+id;
    }
</script>


<%@ include file="../header.jsp" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
   <div id="content-container1">
        <div id="content">
            
            <div id="syshome-title">
                <h3>List of Deactivated Administrator Accounts</h3>
            </div>

            <div id="err">
              <font color="red"> <c:out value="${error}"></c:out></font>
            </div>
            <!-- Content goes here -->
            <% int count = 0; %>
            <div id="pa-list">
              <table class="sysadmintable">
                <tr>
                    <th>Poll Administrator ID</th>
                    <th>Reactivate Account</th>
                </tr>
                <tr>          
                <c:forEach items="${deactive}" var="admin">     
                    <tr>   
                        <c:if test="${admin != 0}">
                            <% 
                                count++;
                            %>
                            <td>${admin}</td>
                            <td><input type="button" value="Reactivate" onclick="reactivate(${admin})"/></td>
                        </c:if>
                    </tr>
                </c:forEach>  
                </tr>
              </table>
              <br/>  
              <div id="msg">                   
                  <%
                    if (count == 0) {
                  %>
                  <font color="red">There are no deactivated accounts!</font>
              <% } %>
              </div>
              <div id="back">
                  <input type="button" onClick="window.location.href='managePA.html'" value="Back"/>
              </div>
           </div>
    </div>		

<%@ include file="../footer.jsp" %>
